package com.dk.controller;

import com.dk.bean.Result;
import com.dk.em.ResultEnum;
import com.dk.service.CarOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 帅杰
 * @since 2021-08-11 订单售后管理服务
 */
@RestController
@RequestMapping("aftersale")
@Api
public class AftersaleController {
    @Autowired
    private CarOrderService carOrderService;

    @DeleteMapping
    @ApiOperation(value = "逻辑删除")
    public Result toDelete(@PathVariable("orderId")Long orderId){
       boolean b= carOrderService.toDelete(orderId);
        return Result.buildResult(ResultEnum.SUCCESS).setData(b);
    }
}
